package com.cyzy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cyzy.pojo.Comment;
import com.cyzy.vo.CommunityComment;
import com.cyzy.vo.PublishCommon;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CommunityMapper extends BaseMapper<Comment> {
    //家长查询家长社区情况
    List<CommunityComment> queryParentCommunityInfoByParent(@Param("campusId") Long campusId,
                                                     @Param("parentId") Long parentId);
    //家长查询老师社区情况
    List<CommunityComment> queryTeacherCommunityInfoByParent(@Param("campusId") Long campusId,
                                                            @Param("teacherId") Long pateacherIdrentId);

    //查看指定动态的评论
    List<Comment> selectCommentsByMesId(@Param("mesId") Long mesId);

    //家长发布动态查询孩子信息
    List<PublishCommon> queryChildInfo(@Param("parentId") Long parentId);

    //老师发布动态查询学生信息
    List<PublishCommon> queryStudentInfo(@Param("teacherId") Long teacherId);
}
